<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>mtlb_beta</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>M2SCI function</center>
    <div align="right">Last update : 04/06/2004</div>
    <p>
      <b>mtlb_beta</b> - Matlab beta emulation function</p>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>Matlab and Scilab <tt>
        <b>beta</b>
      </tt> behave differently in some particular cases:</p>
    <dl>
      <dd>
        <b></b>
        <dd>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        With inputs having different sizes: Matlab <tt>
              <b>beta</b>
            </tt> input parameters must have
	the same size unless one of them is a scalar. In Scilab <tt>
              <b>beta</b>
            </tt> input parameters
	must have the same size even if one of them is a scalar.
        </li>
        </dd>
      </dd>
    </dl>
    <p>
    The function <tt>
        <b>mtlb_beta(A,B)</b>
      </tt> is used by
    <tt>
        <b>mfile2sci</b>
      </tt> to replace <tt>
        <b>beta(A,B)</b>
      </tt> when it was not
    possible to know what were the inputs while porting Matlab code to Scilab. This function will
    determine the correct semantic at run time. If you want to have a
    more efficient code it is possible to replace <tt>
        <b>mtlb_beta</b>
      </tt> calls:
    </p>
    <dl>
      <dd>
        <b></b>
        <dd>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        If <tt>
              <b>A</b>
            </tt> is a scalar but not <tt>
              <b>B</b>
            </tt>
            <tt>
              <b>Y = mtlb_beta(A,B)</b>
            </tt> may be replaced by <tt>
              <b>C=B;C(:)=A;Y = mtlb_beta(C,B);</b>
            </tt>
          </li>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        If <tt>
              <b>B</b>
            </tt> is a scalar but not <tt>
              <b>A</b>
            </tt>
            <tt>
              <b>Y = mtlb_beta(A,B)</b>
            </tt> may be replaced by <tt>
              <b>C=A;C(:)=B;Y = mtlb_beta(A,C);</b>
            </tt>
          </li>
        </dd>
      </dd>
    </dl>
    <p>Caution: <tt>
        <b>mtlb_beta</b>
      </tt> has not to be used for hand coded functions.</p>
    <h3>
      <font color="blue">Authors</font>
    </h3>
    <dl>
      <dd>
        <b></b>V.C.</dd>
    </dl>
  </body>
</html>
